package cn.edu.sspu.www.exception;

/**
 * BaseErrorType
 * @author warm
 * @version 2019年07月31日
 */
public interface BaseErrorType {

    /** HTTP鐘舵�佺爜 */
    public static final int CODE_SUCCESS = 200; // 鎴愬姛
    public static final int CODE_PAGE_NOT_FOUND = 404; // 鎵句笉鍒伴〉闈�
    public static final int CODE_SERVER_EXCEPTION = 500; // 鏈嶅姟绔敊璇�
    public static final int CODE_SERVER_NOT_FOUND = 502; // 璁块棶涓嶅埌鍚庣鏈嶅姟
    public static final int CODE_SERVER_TIMEOUT = 504; // 璁块棶鏈嶅姟瓒呮椂

    /** 鍏叡寮傚父鐘舵�佺爜 */
    public static final int CODE_PARAM_NULL = 601; // 鍙傛暟涓虹┖寮傚父
    public static final int CODE_PARAM_CHECK_FAIL = 602; // 鍙傛暟鏍￠獙澶辫触
    public static final int CODE_PARAM_INVALID = 603; // 鍙傛暟鏍煎紡涓嶆纭�

    public static final int CODE_DATA_NULL = 701; // 鏁版嵁涓虹┖锛屼竴鑸寚鎺ュ彛涓繑鍥瀗ull
    public static final int CODE_DATA_NOT_EXIST = 702; // 鏁版嵁涓嶅瓨鍦紝涓�鑸寚鏁版嵁搴撲腑涓嶅瓨鍦�
    public static final int CODE_DATA_DUPLICATION = 703; // 鏁版嵁閲嶅
    public static final int CODE_DATA_ERROR = 704; // 鏁版嵁閿欒

    public static final int CODE_UPLOAD_FILE_FORMAT_ERROR = 711; // 涓婁紶鏂囦欢鏍煎紡鏈夎
    public static final int CODE_UPLOAD_FILE_OVER_RANGE = 712; // 涓婁紶鏂囦欢澶у皬瓒呰繃缁欏畾鑼冨洿
    public static final int CODE_FILE_UPLOAD_ERROR = 713; // 涓婁紶鏂囦欢鍑洪敊

    public static final int CODE_USER_NO_ACCESS = 801; // 娌℃湁鏉冮檺

    /**
     * 鑾峰彇閿欒鐮佸��
     * 
     * @return
     */
    public int getCode();

    /**
     * 鑾峰彇閿欒鐮佸搴旂殑閿欒淇℃伅
     * 
     * @return
     */
    public String getMessage();

}
